package io.renren.param;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.renren.entity.EslEntity;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class EslHeartBeatData {
    @JsonProperty(value = "ap_id")
    String apId;

    @JsonProperty(value = "last_hb_time")
    String lastBbTime;

    @JsonProperty(value = "firmware_id")
    String firmwareId;

    @JsonProperty(value = "rf_power")
    String rfPower;

    @JsonProperty(value = "reserve")
    String reserve;

    @JsonProperty(value = "set_wor")
    String setWor;

    @JsonProperty(value = "nfc")
    String nfc;

    @JsonProperty(value = "esl_id")
    String eslId;

    @JsonProperty(value = "battery")
    String battery;

    @JsonProperty(value = "user")
    String user;

    @JsonProperty(value = "rom_version")
    String romVersion;

    public static EslEntity convertFor(EslHeartBeatData data) {
        EslEntity eslEntity = new EslEntity();
        BeanUtils.copyProperties(data, eslEntity);
        return eslEntity;
    }
}
